package com.uwo.house.service.serviceImpl;

import com.uwo.house.beans.request.VisitOrderReq;
import com.uwo.house.beans.response.VisitOrderResp;
import com.uwo.house.dao.VisitOrderDao;
import com.uwo.house.service.ICsmVisitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * Created by YZYG on 2017/7/14.
 */
@Service
public class CsmVisitService implements ICsmVisitService {
    @Autowired
    public VisitOrderDao visitOrderDao;

    public int orderVisit(VisitOrderReq visitOrderReq) {
        return this.visitOrderDao.orderVisit(visitOrderReq);
    }

    public List<VisitOrderResp> getVisitOrderList(String userId, Date dateFrom, Date dateTo) {
        return this.visitOrderDao.getVisitOrderList(userId, dateFrom, dateTo);
    }

    public int deleteVisitOrder(String id){
        return this.visitOrderDao.deleteVisitOrder(id);
    }

    public String getSampleHouseAddress(int houseId) {
        return this.visitOrderDao.getSampleHouseAddress(houseId);
    }
}
